package com.swt.gap.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@ApiModel
@Data
public class UploadFileVO {

//    private Integer failedTotalCount;

//    private Integer successTotalCount;
    private Boolean uploadSuccess;

    @ApiModelProperty(value = "上传成功的数据id（包括重名数据）")
    private Integer fileId;

    @ApiModelProperty(value = "数据库中已存在的数据id")
    private Integer oldFileId;

    @ApiModelProperty(value = "失败的文件名及其原因")
    private FailedFile failedFile;

    @ApiModel
    @Data
    public static class FailedFile{
        private String failedFileName;

        private Integer errorCode;

        private String errorMessage;

        private String savedFileName;

        private Double fileSize;
    }

    @ApiModelProperty(value = "成功的文件")
    private FileInfo successFile;

//    @ApiModel
//    @Data
//    public static class TypeFiles {
//        private String typeName;
//
//        private Integer typeCode;
//
//        private Integer count;
//
//        private List<FileInfo> fileInfoList;

        @ApiModel
        @Data
        public static class FileInfo {
            private Integer fileType;

            private String originalFileName;

            private String savedFileName;

            private Double fileSize;

            private Integer fileClassId;
        }
//    }

}
